<?php
/**
 * Translator default controller
 *
 * @package		app
 * @subpackage	Components
 * @link		
 * @author		ducdm87
 * @copyright 	ducdm87@gmail.com
 * @license		Commercial
 */
 
class APPFController extends APPObject 
{
	function __construct(){
		
		//set default view to about
		if (!Request::getVar('task') && !Request::getVar('view')) {
//			Request::setVar('task', 'contents');
		}
		parent::__construct();
		
	}
	
	/**
	 * Method to display the view
	 *
	 * @access	public
	 */
	function display()
	{		
		echo 'asd';
	}
	function save()
	{
			
	}
	function listfeed()
	{
		require_once (PATH_APP_MODEL.DS.'feed.php');
		require_once (PATH_APP_VIEWS.DS.'feed'.DS.'view.html.php');
		$model	=	new APPFModelFeed();		
		$view	=	new APPFViewFeed();
		$view->model	=	$model;
		$view->tmp		=	'form';
		$view->listfeeds();
	}
	function feed()
	{
		require_once (PATH_APP_MODEL.DS.'feed.php');
		require_once (PATH_APP_VIEWS.DS.'feed'.DS.'view.html.php');
		$model	=	new APPFModelFeed();		
		$view	=	new APPFViewFeed();
		$view->model	=	$model;
		$view->tmp		=	'list';
		$view->feeds();
	}
	function cat()
	{
		global $app_request;		
		require_once (PATH_APP_MODEL.DS.'feed.php');
		require_once (PATH_APP_VIEWS.DS.'feed'.DS.'view.html.php');
		$model	=	new APPFModelFeed();		
		$view	=	new APPFViewFeed();
		$view->model	=	$model;
		$view->tmp		=	'cat';
		$view->feed();
	}
	function content()
	{
		global $app_request;		
		require_once (PATH_APP_MODEL.DS.'content.php');
		require_once (PATH_APP_VIEWS.DS.'content'.DS.'view.html.php');
		$model	=	new APPFModelContent();		
		$view	=	new APPFViewContent();
		$view->model	=	$model;
		$view->tmp		=	'item';
		$view->feed();
	}
}
?>
